﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FreeSql;
 
[AttributeUsage(AttributeTargets.Property, Inherited = false)]
public class MaxValueAttribute : Attribute
{

    public MaxValueAttribute() { }


    /// <summary>
    /// 前缀字符串
    /// </summary>
    public string Prefix { get; set; } = "";




    /// <summary>
    /// 补位数(字段的总长度等于补位数+prefix)
    /// </summary>
    public int Len { get; set; } = 0;

    /// <summary>
    /// 日期格式  用于生成日期单号
    /// </summary>
    public string DateFormat { get; set; } = "";


    /// <summary>
    /// 0MySql,1SqlServer 2PostgreSQL 3Oracle 4Sqlite  字典的键，值为语句，语句可用 freesql生成。
    /// SQL语句，如(select a)
    /// </summary>
    public Dictionary<int, string>? Sql { get; set; }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="len">补位数</param>
    public MaxValueAttribute(int len)
    {
        this.Len = len;
    }

}
